<link rel="stylesheet" href="__PUBLIC__/bootstrap/css/bootstrap.css" />
<script type="text/javascript" src="__PUBLIC__/js/date/WdatePicker.js"></script>
<include file="Public:header" />
<literal>
    <style>
        .color_btn{
            background: #00ff00;
        }
        .color_blue{color: blue;}
        .color_red{color: red;}
        .color_green{color: green;}
    </style>
</literal>
<!-- MAIN CONTENT -->
<div id="outermain">
    <div class="container">
        <div class="container-fluid" id="LG">
            <div class="row-fluid">
                <div class="span12">

                    <div class="row-fluid">
                        <div class="span12" style="float: left;width: 100%;">
                            <h3 class="text-center">
                                Contest{$contest_info.contest_id}--{$contest_info.title}
                            </h3>
                            <p class="text-center">
                                Start Time: {$contest_info.start_time|date='Y-m-d H:i:s',###}&nbsp;&nbsp;End Time: {$contest_info.end_time|date='Y-m-d H:i:s',###}
                            </p>
                            <p class="text-center">
                                Current Time:  &nbsp;&nbsp;Status:
                                <if condition="$v.end_time lt $now ">
                                    Ended
                                <elseif condition="$v.start_time gt $now"/>
                                        Start
                                <else/>
                                    Running
                                </if>
                                <if condition="$contest_info.private eq 0">
                                    Public
                                    <else/>
                                    Private
                                </if>
                            </p>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span12">
                            <table class="table table-striped table-hover">

                                <thead>
                                <tr>
                                    <th>题目编号</th>
                                    <th>标题</th>
                                    <th>来源</th>
                                    <th>正确</th>
                                    <th>提交</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="list" key="k" item="v">
                                    <tr>
                                        <td>
                                            {$v.problem_id}
                                        </td>
                                        <td>
                                            <a href="{:U('Problem/viewProblem',array('id'=>$v['problem_id']))}">{$v.title}</a>
                                        </td>
                                        <td >
                                            {$v.source}
                                        </td><td >
                                            {$v.solved}
                                        </td><td >
                                            {$v.submit}
                                        </td>
                                    </tr>
                                </foreach>
                                <tr>
                                    <td colspan="6" align="center"> {$page}</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- MAIN CONTENT -->
<include file="Public:footer" />